﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mathematics.Parser;

namespace Mathematics.Expressions
{
    public class ImportKeyword:Keyword
    {
        public ImportKeyword(string filePath)
        {
            FilePath = filePath;
        }

        public string FilePath { get; private set; }

        public override double? Evaluate()
        {
            return Import(FilePath);
        }

        public static double? Import(string filePath)
        {
            return Interpreter.EvaluateFile(filePath);
        }
    }
}
